home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / overview / dtscpluslibrary / sources / template.cp < prev    next >
Encoding:
Text File  |  2000-09-28  |  2.3 KB  |  110 lines

  1. /*
  2.     File:        Template.cp
  3.  
  4.     Contains:    
  5.  
  6.     Written by: Kent Sandvik    
  7.  
  8.     Copyright:    Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 8/18/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23. // •••Include here the one and only C++ class header file
  24. // Include files
  25. #ifndef _FOO_
  26. #include "Template.h"
  27. #endif
  28.  
  29.  
  30. // _________________________________________________________________________________________________________ //
  31. // TFoo class member function implementations
  32.  
  33. //    CONSTRUCTORS & DESTRUCTORS
  34. #pragma segment Foo        // ••• Note that we use the same segment name as the file name for all member functions!                       
  35. TFoo::TFoo()
  36. // Default constructor.
  37. {
  38. }
  39.  
  40.  
  41.  
  42. #pragma segment Foo
  43. TFoo::~TFoo()
  44. // Destructor, we are not doing anything inside this one just now.
  45. {
  46. }
  47.  
  48.  
  49. //     MAIN INTERFACE
  50. #pragma segment Foo
  51. Boolean TFoo::KillApplication(ProcessSerialNumber*/*thePSN*/ )
  52. // Quit the application which is defined by the PSN
  53. {
  54.     return true;
  55. }
  56.  
  57.  
  58. #pragma segment Foo
  59. short TFoo::GetNumProcesses()
  60. // Get the amount of currently running processes.
  61. {
  62.     return (short)4;
  63. }
  64.  
  65.  
  66.  
  67. //    PUBLIC ACCESSORS AND MUTATORS            
  68.  
  69. #pragma segment Foo                       
  70. ProcessSerialNumber TFoo::GetMyProcessID() const
  71. {
  72.     return fMyProcessID;
  73. }
  74.  
  75.  
  76. // ITERATORS
  77.  
  78. #pragma segment Foo                       
  79. void TFoo::Next()
  80. {
  81. }
  82.  
  83.  
  84. #pragma segment Foo                       
  85. Boolean TFoo::Last()
  86. {
  87.     return fLast;
  88. }
  89.  
  90.  
  91. #pragma segment Foo                       
  92. void TFoo::First()
  93. {
  94.     fProcessID = fFirstPSN;
  95. }
  96.  
  97. #pragma segment Foo
  98. void TFoo::Reset()
  99. {
  100. }
  101.  
  102. // ••• Specify here the change history
  103. // _________________________________________________________________________________________________________ //
  104.  
  105. /*    Change History (most recent last):
  106.   No        Init.    Date        Comment
  107.   1            khs        6/10/92        New file
  108.   2            khs        7/6/92        First decent working class
  109. */
  110.